import { LOGIN, LOGITN_SUCCESS, USERINFO_SUCCESS } from '../constants'
import { IloginPayload } from './action'

// 登录
export const login = (payload: IloginPayload) => ({ type: LOGIN, payload })
export const loginSuccess = (payload: any) => ({
  type: LOGITN_SUCCESS,
  payload
})

// 获取用户信息
export const getuseInfo = () => ({ type: 'USERINFO' })
export const getuseInfoSuccess = (payload: any) => ({
  type: USERINFO_SUCCESS,
  payload
})
